﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Search" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title> </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/css/base.css" rel="stylesheet" type="text/css" />
    <link href="/css/home.css" rel="stylesheet" type="text/css" />
     <link href="/css/patch.css" rel="stylesheet" type="text/css" />
     <!--#include file="~/Public/commonjs.shtml" -->
</head>
<body>
   
   
 	 <!--#include file="~/Public/top.shtml" -->
     <!--main开始-->
     <div class="main w960 cb pr">
        <!--#include file="/Public/onlineqq.shtml" -->
       <div class="block1 mt10">
         <!--left-->
         <div class="m_left">
            <h2>商品分类</h2>
           <%
               if (categories != null)
               {
                   bool isEnd = false;
                   for (int i = 0;   i < categories.Count; ++i)
                   {
                       if ( (i+1) >= categories.Count) isEnd = true;
           %>

           <dl class="assort" <%=isEnd?"style=\"border:none;\"":"" %>>
             <dt><%=categories[i].FCategory.Name %></dt>
             <dd>
                <%
                    for (int j = 0; j < categories[i].SCategorys.Count; ++j)
                    {
                        if (j == 0 || (j + 1) % 2 > 0)
                        {
                           Response.Write("<p >");
                        }
                        else
                            Response.Write(" | ");
                        Response.Write("<a  href=\"" + bllUrl.GetGoodsListUrl(categories[i].FCategory.ID, categories[i].SCategorys[j].ID) + "\" >");
                        Response.Write(categories[i].SCategorys[j].Name);
                        Response.Write("</a>");

                       if ((j + 1) == categories[i].SCategorys.Count || (j + 1) % 2 == 0)
                            Response.Write("</p>");
                    }
                   %>
             </dd>
           </dl>
           <%}
               } %>
          
           <div class="cb mb10">
           <div class="left_bar_hot"></div>
           <div class="left_hot">
             <div class="white_bg">
                 <!--#include file="~/AutoGenerate/list-hotgoods-words.shtml" -->
             </div>
             
             <div class="left_hot_list">
                <!--#include file="~/AutoGenerate/list-hotgoods-pic.shtml" -->
             
             </div>
           </div>
           
           <div class="left_bar_bottom"></div>
           </div>
         </div>



         <!--left end-->
         <!--right-->
         <div class="m_right ft">
            <p class="tar">
              当前位置： <a href="/index.aspx">首页</a> > 
            </p>

 				
            <!--休闲食品-->
            <div class="food_x">
              <div class="food_x_top">
              <div class="fl b_titles"> <br/><span>SNACK FOODS</span></div>
                <div class="fr"><!--<a href="#">美国</a> |  <a href="#">日本</a> |  <a href="#">韩国</a> |  <a href="#">澳大利亚</a> |  <a href="#">菲律宾</a>--></div>
              </div>
              <div class="food_x_main">
                
                <%
                    if (listOfGoods != null)
                    {
                        foreach (GoodsInfo g in listOfGoods)
                        {
                 %>
                 <ul class="p_food_list">
                   <li class="mask_pic2"><a href="/Goods/<%=g.BaseInfo.GoodsID %>.html" target="_blank" title="<%=g.BaseInfo.GoodsName %> <%=g.BaseInfo.Promotions %>">
                   <img src="/images/p_food_bg2.gif" class="mask_pic"/>
                   <img src="<%=g.MainPicture.SmallPictureUrl %>" class="mask_pic3" width="138" height="134" /></a></li>
                   <li><a href="/Goods/<%=g.BaseInfo.GoodsID %>.html" class="black0" target="_blank" title="<%=g.BaseInfo.GoodsName %> <%=g.BaseInfo.Promotions %>"><%=Utility.GetMaxString(g.BaseInfo.GoodsName,30,false)%></a></li>
                   <li class="orange"><%=Utility.FormatMoneyStr(g.SalePrice) %>元</li>
                   <li class="button_buy">
                     <a href="javascript:void(0);" onclick="AddToFavorite(<%=g.BaseInfo.GoodsID %>);" class="favo">收藏</a>
                     <a href="/home/ShoppingCarts.aspx?GoodsID=<%=g.BaseInfo.GoodsID %>" target="_blank">购买</a>
                   </li>
                </ul>
                <%} %>
				<p class="cb page_number">
                   <%=Utility.GetPageLineEx(Utility.GetWebPageUrlNoCurPage(), q.CurPage, q.PageSize, 10, q.TotalCount)%>  
                 </p>
                 <%}
                    else
                    { %>
                    <br />
                    <center>
                      [ 抱歉，没有找到符合条件的商品！ ]
                      </center>
                    <%} %>
                 
              </div>
            </div>
         </div> 
         <!--right end-->
       </div>
        
     <!--new product-->
     <!--new product end-->
         <!--六个块-->
         <!--休闲食品-->
         <!---块结束-->
        
         
     </div>
      <!--main结束-->
     <div class="share cb w960">
        <div>
           <!--#include file="~/AutoGenerate/AllPage-Bottom-Banner.htm" -->
        </div>
          <!--#include file="~/Public/bottom-shopHelper.shtml" -->
     </div>
    

    <!--#include file="~/Public/bottom.shtml" -->

</body>
</html>